#pragma once

#include "SMTBasics.h"

namespace opt_smt
{
	inline void addToOprOutputs(SMTOperator* opr, SMTVariable::VariableType type, int idx, QString name, char* desc)
	{
		SMTVariableArray* outVariables;
		SMTVariable tmpVariable(type, QString(name).toLocal8Bit().constData(), QObject::tr(desc).toLocal8Bit().constData(), opr);
		opr->getOutputVariables(&outVariables);
		(*outVariables).push_back(tmpVariable);
		(*outVariables)[idx].setReadOnly(true);
	}

	inline void addToOprInputs(SMTOperator* opr, SMTVariable::VariableType type, int idx, QString name, char* desc)
	{
		SMTVariableArray* inVariables;
		SMTVariable tmpVariable(type, QString(name).toLocal8Bit().constData(), QObject::tr(desc).toLocal8Bit().constData(), opr);
		opr->GetInputVariables(&inVariables);
		(*inVariables).push_back(tmpVariable);
		(*inVariables)[idx].setReadOnly(true);
	}
}
